package com.example.mobile2030606162zwh0401;

import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;

import androidx.appcompat.app.AppCompatActivity;

public class MainActivity extends AppCompatActivity {

    private ImageView ivManinlight;
    private Button binmainlighton;
    private Button binmainlightoff;
    private Button binmainfan;
    private Button binMainLighton;
    private Button binMainLightoff;
    private Button binMainFan;
    private ImageView imageView3;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        initView();


        binmainfan.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                ivManinlight.setImageResource(R.drawable.light_on);
                ivManinlight.setImageResource(R.drawable.light_off);
            }
        });

    }

    private void initView() {

        binMainLighton = (Button) findViewById(R.id.bin_main_lighton);
        binMainLightoff = (Button) findViewById(R.id.bin_main_lightoff);
        binMainFan = (Button) findViewById(R.id.bin_main_fan);
        imageView3 = (ImageView) findViewById(R.id.imageView3);
    }


}